var express = require('express');
var router = express.Router();
const userService = require("../src/services/userServices")
/* GET users listing. */
router.post('/login', async function (req, resp) {
  let {
    username,
    pwd
  } = req.body;
  let res = await userService.login(username, pwd);
  if(res){
    resp.json({"code":1,"msg":"登录成功"})
  }else{
    resp.json({"code":0,"msg":"登录失败"})
  }
});

module.exports = router;